home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / libdwarf / pro_line.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.2 KB  |  95 lines

  1. /*
  2.     pro_line.h 
  3.     $Revision: 1.5 $    $Date: 1993/07/19 22:39:37 $    
  4.  
  5.     Contains header file descriptions for line number information
  6. */
  7.  
  8. #define VERSION                2
  9. #define MIN_INST_LENGTH            4
  10. #define DEFAULT_IS_STMT            false
  11.             /* line base and range are temporarily defines.
  12.                They need to be calculated later */
  13. #define LINE_BASE            -1
  14. #define LINE_RANGE            4
  15.  
  16. #define OPCODE_BASE            10
  17. #define MAX_OPCODE            255
  18.  
  19. static Dwarf_Ubyte std_opcode_len[] = 
  20.     { 0,    /* DW_LNS_copy */
  21.       1,    /* DW_LNS_advance_pc */
  22.       1,    /* DW_LNS_advance_line */
  23.       1,    /* DW_LNS_set_file */
  24.       1,    /* DW_LNS_set_column */
  25.       0,    /* DW_LNS_negate_stmt */
  26.       0,    /* DW_LNS_set_basic_block */
  27.       0,    /* DW_LNS_const_add_pc */
  28.       1,    /* DW_LNS_fixed_advance_pc */
  29.     };
  30.  
  31. /*
  32.     This struct is used to hold entries in the include directories
  33.     part of statement prologue.
  34. */
  35. struct Dwarf_P_Inc_Dir_s {
  36.     char         *did_name;        /* name of directory */
  37.     Dwarf_P_Inc_Dir    did_next;
  38. };
  39.  
  40.  
  41. /*
  42.     This struct holds file entries for the statement prologue. 
  43.     Defined in pro_line.h
  44. */
  45. struct Dwarf_P_F_Entry_s {
  46.     char         *dfe_name;
  47.     char        *dfe_args;    /* has dir index, time of modification,
  48.                        length in bytes. Encodes as leb128 */
  49.     int            dfe_nbytes;    /* number of bytes in args */
  50.     Dwarf_P_F_Entry    dfe_next;
  51. };
  52.  
  53.  
  54. /*
  55.     Struct holding line number information for each of the producer 
  56.     line entries 
  57. */
  58. struct Dwarf_P_Line_s {
  59.         /* code address */
  60.     Dwarf_Addr              dpl_address;    
  61.  
  62.         /* file index, index into file entry */
  63.     Dwarf_Word              dpl_file;        
  64.  
  65.         /* line number */
  66.     Dwarf_Word              dpl_line;        
  67.  
  68.         /* column number */
  69.     Dwarf_Word              dpl_column;        
  70.  
  71.         /* whether its a beginning of a stmt */
  72.     Dwarf_Ubyte            dpl_is_stmt;    
  73.  
  74.         /* whether its a beginning of basic blk */
  75.     Dwarf_Ubyte            dpl_basic_block;    
  76.  
  77.         /* used to store opcodes set_address, and end_seq */
  78.     Dwarf_Ubyte            dpl_opc;    
  79.  
  80.         /* 
  81.         Used only for relocations.  Has index of symbol 
  82.         relative to which relocation has to be done 
  83.         (the S part in S + A) 
  84.         */
  85.     Dwarf_Unsigned        dpl_r_symidx;    
  86.  
  87.     Dwarf_P_Line        dpl_next;
  88. };
  89.  
  90. /* 
  91.     to initialize state machine registers, definition in 
  92.     pro_line.c
  93. */
  94. void _dwarf_pro_reg_init (Dwarf_P_Line);
  95.